import time

from selenium import webdriver
from selenium.webdriver.common.by import By

browser = webdriver.Chrome()
browser.get(r'https://www.bing.com/')
browser.maximize_window()
element = browser.find_element(by=By.ID, value='sb_form_q')
element.send_keys('xxxxxxxx')
search_icon = browser.find_element(by=By.ID, value='search_icon')
search_icon.click()
# 关闭浏览器
time.sleep(2)
browser.close()
